from pydantic import BaseModel

# --- User Schemas ---

class UserBase(BaseModel):
    username: str

class UserCreate(UserBase):
    token_balance: int = 0 # 初始token数量，默认为0

class User(UserBase):
    id: int
    api_key: str
    token_balance: int

    class Config:
        orm_mode = True

# --- Token Schemas ---

class TokenUpdate(BaseModel):
    token_balance: int
